package com.kuaiditu.assistant.api.assistant_api.base;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

/**
 * Created by Eenie on 2017/8/31.
 * Email: eeniework@gmail.com
 * Des:
 */

public class AssistantResponse {

    private String respCode;
    private String respData;
    private String sign;
    private String respMsg;

    public String getRespCode() {
        return respCode;
    }

    public void setRespCode(String respCode) {
        this.respCode = respCode;
    }

    public String getRespData() {
        return respData;
    }





    public void setRespData(String respData) {
        this.respData = respData;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }


    public boolean isSuccess() {
        return respCode.equals("00");
    }

    public String getRespMsg() {
        return JSON.parseObject(respData).getString("respMsg");
    }

    public Object getRespData(Class clz) {
        return JSONObject.parseObject(respData, clz);
    }


    public JSONObject getRespDataEn() {
        return JSON.parseObject(respData);
    }
}
